// mainWindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H


#include<customwidget.h>
#include<QButtonGroup>
#include"stackedchanged.h"
#include<QSystemTrayIcon>
#include<QMenu>
#include<QAction>
#include<QTcpSocket>
#include"clientsocket.h"
namespace Ui {
class MainWindow;  // 前向声明
}

class MainWindow : public  CustomMoveWidget
{  Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void showmenu();
    void getsocket(ClientSocket*socket,QString name);
    void InitSysMenu();
    void InitQQListMenu();
    void AddTestFriends();
private slots:
    void SltMainPageChanged(int index);
    void clickedtray(QSystemTrayIcon::ActivationReason reason);
    void minclicked();

private:
    Ui::MainWindow *ui;
    QButtonGroup *m_btnGroup;
     int m_previousIndex;
    QSystemTrayIcon*m_systemtray;
    QMenu* menu;
    QAction*disWod;
    QAction*login;
    QAction*quit;
   ClientSocket* usersocket;
    QString username;
   QAction* leave;
};

#endif // MAINWINDOW_H
